var dom = document.getElementById("container1");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
    title: {
        text: '多雷达图'
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        x: 'center',
        data:['不良品成因','绩效达成率']
    },
    radar: [
        {
            indicator: [
                {text: '电感不良', max: 100},
                {text: '电压不良', max: 100},
                {text: '外观问题', max: 100},
                {text: '其他', max: 100}
            ],
            center: ['25%','40%'],
            radius: 80
        },
        {
            indicator: (function (){
                var res = [];
                for (var i = 1; i <= 12; i++) {
                    res.push({text:i+'月',max:100});
                }
                return res;
            })(),
            center: ['75%','40%'],
            radius: 80
        }
    ],
    series: [
        {
            type: 'radar',
             tooltip: {
                trigger: 'item'
            },
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data: [
                {
                    value: [60,73,85,40],
                    name: '不良品成因'
                }
            ]
        },
        {
            type: 'radar',
            radarIndex: 1,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data: [
                {
                    name: '绩效达成率',
                    value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3],
                }
            ]
        }
    ]
};
;
if (option && typeof option === "object") {
    myChart.setOption(option, true);
}
